package com.xzw.test.springcloud.alibaba.feign;

import com.xzw.test.springcloud.alibaba.config.FeignConfiguration;
import com.xzw.test.springcloud.alibaba.service.impl.EchoServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name="nacos-provider",fallback = EchoServiceFallback.class,configuration = FeignConfiguration.class)
//@FeignClient(contextId ="echoService" ,value="nacos-provider") //使用feign模式调用提供者，记得App里面配置@EnableFeignClients
public interface EchoService {

    @GetMapping(value = "/echo/{str}")
    String echo(@PathVariable("str") String str);


}
